To be competitive in a global market, a network-based marketplace that serves a large, world-wide community of users may find it beneficial to meet objectives of (1) rapidly developing, modifying, testing, or deploying a large number of server-side applications such that rapidly-changing needs of the users are met, (2) optimizing the server-side applications such that their deployment does not violate resource and performance constraints. In one approach, the network-based marketplace may achieve its objective by employing a large-sized group of developers to code each server-side application by hand; however, such an approach may have various drawbacks, including producing applications that have a less consistent look-and-feel, take a longer time to develop, or are less efficient in terms of, for example, reuse of code, than applications produced using other approaches. In another approach, the network-based marketplace may achieve its objectives by employing a small-sized group of developers to code applications that conform rigidly to a template; however, such an approach would also have various drawbacks, including producing applications that are more difficult to customize, consume more resources, or have slower performance than applications produced using other approaches.
Thus, there may be a need to develop each server-side application using a framework that supports the rapid developing, modifying, testing, or deploying of the large number of server-side applications using widgets. A widget may be a software component that has one or more user interfaces (UIs) and is backed by business logic (or services). That is, the widget may have a presentation layer that may be plugged in or configured to present one or more views and a logic layer that may be plugged in or configured to incorporate various data sources or services. The widget may also have a connection module that connects the presentation layer to the logic layer. The widget may also support optimizations, including real-time resource aggregation and real-time service orchestration. Real-time service orchestration may allow the widget to support run-time optimizations, including detecting and combining calls by multiple widgets to the same service. Real-time resource aggregation may allow the widget to aggregate at run-time all resources for a web page into a single resource for the web page (e.g., aggregate all versions or instances of a JavaScript or a cascading style sheet (CSS) into a single resource for the web page). The framework may also support design-time or real-time creation, modification, or deletion of the page (e.g., through a developer tool that supports dragging-and-dropping of the components).